package cn.sofwin.day0126.homework.Pet;

import java.util.Scanner;

public class PetTest {
    static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        Pet pet;
        System.out.println("欢迎您来到宠物店");
        System.out.print("请输入要领养宠物的名字：");
        String name = sc.next();
        System.out.print("请选择要领养宠物的类型：（1.狗狗 2.企鹅）");
        switch (sc.nextInt()){
            case 1:
                pet = new Dog(name, 100, 20);
                break;
            case 2:
                pet = new Penguin(name, 100, 20);
                break;
            default:
                System.out.println("输入有误");
                return;
        }
        pet.print();
    }
}
